package me.devilsen.czxing.compat;

import android.content.Context;
import android.os.Process;

public class ContextCompat {

    protected ContextCompat() {
    }

    public static int checkSelfPermission( Context context,  String permission) {
        if (permission == null) {
            throw new IllegalArgumentException("permission is null");
        } else {
            return context.checkPermission(permission, Process.myPid(), Process.myUid());
        }
    }

}
